﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.EntityModel;
using YasharEl.Infrastructure.Core.Personification;
using YasharEl.Infrastructure.Core.Users;
using System.ComponentModel.DataAnnotations;

namespace YasharEl.Infrastructure.Core.EntityModel.Users.Metadata
{
    public class UserEntityMetadata : Entity, IUser
    {
        [Key]
        public long UserId
        {
            get;
            protected set;
        }

        [Required]
        public IsraelIdentityNumber UserIdentityId
        {
            get;
            protected set;
        }

        [Required]
        public Name UserName
        {
            get;
            protected set;
        }

        [Required]
        public string Email
        {
            get;
            protected set;
        }

        public override long Id
        {
            get
            {
                return UserId;
            }
            protected set
            {
                UserId = value;
            }
        }
    }
}
